eq1

Want to know eq1? we have a huge selection of eq1 information on alibabacloud.com

Shell script to add a user to delete a user's deleted files

Shell script to add a user to delete a user's deleted files[Cpp] view plaincopy #/Bin/bash # DEBUG = 0 ADD = 0 DEL = 0 RM = 0 While [$ #-gt0] Do Case $ 1in -V |-verbose) DEBUG = 1 Shift ;; -H | -- help) # Help documentation Echo "'basename $ 0' -- addLIST -- delLIST-h | -- help -- rmLIST" Exit0 ;; -- Add) # Add a user ADD = 1 ADDUSER = $2 Shift2 ;; -- Del) # Deleting a user DEL = 1 DELUSER = $2 Shift2 ;; -- Rm) # Deleting an object RM = 1; RMFILE = $2 Shift2

SVN common Shortcut command set.

-vSvnc-tExport path=/opt/subversion/Bin: $PATHmaster="HTTP:YOURSVN"functionMyhelp_fn () {Echo '-V: Introduction. -M: Accept my conflict. -T: Accept his conflict.r:revert svnopc: Displays files with only attribute conflicts. Acceptable Parameters-v,-m,-T. and the specific file name, if it is a specific filename will be the. prej file together. SVNOPM: Displays only files that have changed properties. Acceptable Parameters-R. Svnc: Displays all conflicting files. is acceptable-m,-T. Svnmm:merge ba

Shell Programming (III)

Tags: case nbsp deb echo users Userdel turn on debug--Create a script admin.shPerform the following functions:-H | --HELP: Providing Help information--add users: Completing user additions-del User | --delete: Complete User deletion-V: Turn on debug mode, display informationYou can use all of the above commands at the same time#!/bin/Bash#debug=0ADD=0DELETE=0 forIinch`seq 1 $#` Do Case$1 inch-h|--Help )Echo "--v--help--add--delete--userlist" ;;-v|--Versbo) DEBUG=1 Shift ;;--a

Shell programming (12) --- add user example

[[emailprotected]Learn]#catuseradd-final.sh#!/bin/bash#DEBUG=0ADD=0DEL=0help(){echo"Usage:$(basename$0)-v|--verbose|--adduser1,user2,...|--deluser1,user2,...|-h|--help"}while[$#-ne0]docase$1in-h|--help)helpexit0;;-v|--verbose)DEBUG=1shift;;--add)ADD=1ADDUSERS=$2shift2;;--del)DEL=1DELUSERS=$2shift2;;*)helpexit5;;esacdoneif[$ADD-eq1];thenforusersin$(echo$ADDUSERS|sed‘s/,//g‘)doifid$users>/dev/null;thenif[$DEBUG-eq1

Python implements three lines of code to solve a simple one-dimensional equation and three lines of python.

Python implements three lines of code to solve a simple one-dimensional equation and three lines of python. The example described in this article is that Python uses three lines of code to solve the one-dimensional equation. The code is concise and efficient. The specific usage is as follows: >>> solve("x - 2*x + 5*x - 46*(235-24) = x + 2")3236.0 The function code is as follows: def solve(eq,var='x'): eq1 = eq.replace("=","-(")+")" c = eval(

A simple script that automatically creates shell scripts

Because I usually write some small experimental script, every time to write author,description and so very troublesome, then wrote such a script can create their own small script, code as follows, pure personal original, relatively rough, big God do not spray#!/bin/bash#ver=0aut=0tim=0des=1if[$#-lt1];then echo "' Basename$0 ' :-a|--author|-t|-d|-v|-f|--file/path/to/file| -H "exit3fiwhile[$#-ge1]; Docase$1in-v|--version) VER=1 shift;; -H|--HELP) echo "' Basename$0 ' :-a|-- Author|-t|-d|-v|-f|--

OpenLDAP Restricting User Login hosts

User2 is unable to log in, through the control group to restrict the user to log on to the server6. Script Automatic implementation of judgment#!/bin/bashfunctionget_gid () {ldapsearch-xgidnumber-b "cn=$1,ou=group,dc=vxuepin,dc=com" 2>/dev/null|grep "^gidnumber" | awk ' {print$2} '}functionfilter_on_centos5 () { #samples: #nss_base_passwd dc=vxuepin,dc=com?sub?gidNumber=1000 #nss_base_passwd dc=vxuepin,dc=com?sub?| (gidnumber=1000) (gidnumber=1003) cp/etc/ldap.conf/etc/ldap.conf. ' date+%Y%m

Startup management scripts for Nrpe in Nagios

The recent period of time should be a lot of adjustments to modify the Nagios monitoring policy so need to re-restart Nrpe, but after Nagios installation is not provided Nrpe startup script, so I wrote a Nrpe for the usual restart:#!/bin/sh#thestartupscriptfornrpe#author:jim#processname:nrped#chkconfig: 23459703#description:Thisisadaemonusedfornrpe Startupmanagementinnagios#sourcefunctionslibraryif[-f/etc/rc.d /init.d/functions];then./etc/rc.d/init.d/functionselif[- f/etc/init.d/functions];then.

Shell script game: scissors stone Cloth

#!/bin/bash#author: The Adventures of Tintin (Jacob) #定义数组, save all the possibilities of Punch game= (stone scissors cloth) num=$[random%3]computer=${game[$num]}# Get the punch of a computer by random number # The possibility of a punch is saved in an array, game[0],game[1],game[2] is 3 different possible echo "Please choose your punch gesture according to the following tips" echo "1. Stone "echo" 2. Scissors "echo" 3. Cloth "read-p" Please select 1-3: "person# prompts the user to punch, Acco

Understanding of "Java Fundamentals" "equals" and "= ="

(objinstanceofEquals) {Equals equ=(Equals) obj; return This. Name.equals (Equ.name) This. Age = =Equ.age; } return false; } @Override Public inthashcode () {return31 * This. Name.hashcode () + ((Integer) This. Age). Hashcode (); } Public Static voidMain (string[] args) {Equals eq1=NewEquals ("s", 3); Equals EQ2=NewEquals ("s", 3); System.out.println (Eq1.equals (EQ2)); System.out.println

[PowerShell] calculates 9x9 Sudoku with PowerShell.

element, adding an array of 1-9 to the element that has no value. for($i= 0;$i -lt9;$i++){ for($j= 0;$j -lt9;$j++){ if(!$SudokuMatrix[$i][$j]){ $SudokuMatrix[$i][$j] = 1..9 }Else{ $SudokuMatrix[$i][$j] = @($SudokuMatrix[$i][$j]) } }}#loop each element, comparing horizontal and vertical data, from removing all possible values. functionGoloop ($arr){ $NEWARR= @($null) * 9 for($i= 0;$i -lt9;$i++){ $NEWARR[$i] =$arr[$i]. Psobject.copy ()}

Linux cluster-load balancer LVS-DR implementation MySQL

#installipvsadmrpm-qipvsadm>/dev/ null// Installing the IPVSADM command-line tool If[$?-eq1];thenyuminstall-yipvsadm >/dev/nullfi#definevariableipvsadm= ' Whichipvsadm ' vip=172.16.16.2rs1=172.16.16.3rs2= 172.16.16.4#ifconfigeth0:0vipifconfigeth0:0 $VIP/32broadcast $VIP up# definelvs-dr$IPVSADM-C //Purge rule $ipvsadm-a-t $VIP:3306-slblc //define MySQL Cluster service $ipvsadm-a-t $VIP:3306-r $RS 1:3306-g //Add node to the DR model of the MySQL Clust

Optimal fishing strategy

: first create two M-files. % [Buyu. m] optimal fishing strategy Problem Function Y = buyu (X) Global A10 A20 A30 A40 total K; Syms K A10; X1 = dsolve ('dx1 =-0.8 * x1', 'x1 (0) = a10 '); T = 1; A20 = Subs (X1 ); X2 = dsolve ('dx2 =-0.8 * X2 ', 'x2 (0) = a20 '); T = 1; A30 = Subs (X2 ); X31 = dsolve ('dx31 =-(0.8 + 0.42 * k) * x31', 'x31 (0) = a30 '); T = 2/3; A31 = Subs (x31 ); X32 = dsolve ('dx32 =-0.8 * x32', 'x32 (2/3) = a31 '); T = 1; A40 = Subs (x32 ); X41 = dsolve ('dx41 =-(0.8 + k) * x41

Python implements three lines of code to solve a simple one-dimensional equation-Python tutorial

This article mainly introduces how to implement three lines of code in Python to solve a simple one-dimensional equation, which is suitable for beginners of Python to learn from, you can refer to the example described in this article to use three lines of code to solve the one-dimensional equation. the code is concise and efficient. the usage is as follows: >>> Solve ("x-2 * x + 5 * x-46 * (235-24) = x + 2") 3236.0 The function code is as follows: Def solve (eq, var = 'x'):

Ogg Operations Optimization Script (12)-Information synchronization class--Information upload

files : upload.shpath : $HOME/ggscript/gguploadFunction: The script will not be used directly, to meet other scripts to upload information and design, directly within the script to upload the corresponding file informationHe reads system configuration information in the System Information Profile SysInfoExample[detest#]Ip-mtmyljeyms4xmdeuodykusername-z2dzcg==Password-z2dzxxxxxxPort-mjikPath-l2rhdgexl2dncy9nz3nlcnzlci9kaxjkzwyk[#detest]The above information is encrypted with Base64, ensuring info

Shell monitoring scripts, regardless of multi-user situation

#!/bin/bashcheckprocess () {if[" $"="" ]; Thenreturn 1fi process_num= ' Ps-ef | Grep" $"| Grep-v"grep"| WC-l 'if[$PROCESS _num-eq1 ]; Thenreturn 0 Else return 1fi} while[1] ; Do#输入进程名 Echo" $"; Echo" $"; Echo" $"; Checkprocess" $"Checkqq_ret=$?if[$CheckQQ _ret-eq1 ]; Then # Killall-9A. out# exec./A. out#java-cp/home/hadoop/hivestudy/task2-2.0. Jar Com.my.task2.filemoniter/home/hadoop/hivestud

Shell Script Application Applet

The summation of 1...100Non-recursive: #!/bin/bashreadnumcount=1sum=0val= "" ret= "" while [ $count -le $num ]doif[ $count -eq $num ];thenval= $count else val=${count} ' + ' fi letsum+=countletcount++ret=${ret}${val} doneecho${ret} ' = ' $sum recursion: #!/bin/bashreadnumfunctionadd () { localval=$1localcount=0 localsum=0localnum= $val if[ $val -eq1];then Echo1returnfiarr= $count 1+$ valletval--letcount=$ (add$ val) letsum= $count + $num echo $sum

10 Linux Script interview questions, see how many you can answer?

/etc directory to the/backups directory and name it/backups/ etc-20160613.tar.bz2; (3) If the value of parameter 1 is XZ, use the tar and XZ archives to compress the/etc directory to the/backups directory and name/backups/etc-20160613.tar.xz; (4 ) Any other value, the error compression tool is displayed, and an abnormal exit is performed; #!/bin/bashif[$#-eq1];then case$1in "gzip") tar-zcf/backup/etc-' Date+%F '. tar.gz /etc/*;; "bzip2") tar-j

Shell Intranet Host Survival detector

Recently in the study of shell programming, idle to do nothing, to engage in a small shell. can be used to detect the surviving host of a network segment.1#!/bin/Bash2 #3#Date: the/ A/ -4#blog: www.cnblogs.com/Outline5 #by: Joe6 7 if[$#-lt1] ; Then8 Echo "err, usage:ping.sh ARg"9 Echo "eg:ping.sh 192.168.1"TenExit8 One fi A -ips=" $" - Stat=1 the forIpinch$(seq 1 254) - Do - Ping-C1${IPS}.${IP} >/dev/NULLStat=1||Stat=0 - if[ $Stat-eq1]; Th

Mysql-mmm and keepalived high availability MySQL underlying architecture

- apn|grepmmm_mond;if[[$?-eq1]];thenexit1;else exit0;fi "script" Netstat-apn|grepmmm_mond " interval2 weight -fall3 rise1} vrrp_instancevi_1{statebackup interfaceeth0 virtual_router_id52 #nopreempt priority100 advert_int1 authentication{auth_typepass auth_pass1111 } virtual_ ipaddress{192.168.1.249/24deveth0label eth0:1 } track_interface{ eth0 } track_script{ nbsP;chk_down } debug notify_master "/etc/keepalived/mmm_restart.sh" notify_backup "/et

Related Keywords:
Total Pages: 7 1 2 3 4 5 .... 7 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.